def solve(weights: list[int], values: list[int], capacity: int):
    radio = [(values[i]/weights[i] , weights[i],values[i]) for i in range(len(weights))]
    radio.sort(key=lambda x: x[0])
    remain_capcity = capacity
    all_value = 0
    item_ptr = len(weights) -1
    while remain_capcity > 0 and item_ptr >= 0:
        # 依次取单价最高的物品
        if remain_capcity >= radio[item_ptr][1]:
            remain_capcity -=  radio[item_ptr][1]
            all_value += radio[item_ptr][2]
            item_ptr -= 1
        else:
            all_value += (radio[item_ptr][1] - remain_capcity) * radio[item_ptr][0]
            break
        
    return all_value

if __name__ == "__main__":
    n, capacity = map(int, input().split())
    weights = []
    values = []
    for _ in range(n):
        w, v = map(int, input().split())
        weights.append(w)
        values.append(v)
    
    print(f"{solve(weights, values, capacity):.2f}")
